﻿using AspAuthentication.Core;

namespace AspAuthentication.Interfaces
{
    /// <summary>
    /// Defines the contract for IUserFormsAuthentication
    /// </summary>
    public interface IUserFormsAuthentication
    {
        /// <summary>
        /// Gets or sets the forms authentication provider.
        /// </summary>
        /// <value>The forms authentication provider.</value>
        IFormsAuthenticationProvider FormsAuthenticationProvider { get; set; }

        /// <summary>
        /// Gets or sets the membership provider.
        /// </summary>
        /// <value>The membership provider.</value>
        IPortalMembershipProvider MembershipProvider { get; set; }

        /// <summary>
        /// Logins the specified user name.
        /// </summary>
        /// <param name="userName">Name of the user.</param>
        /// <param name="password">The password.</param>
        /// <param name="createPersistentCookie">if set to <c>true</c> [create persistent cookie].</param>
        void Login(string userName,string password, bool createPersistentCookie);

        /// <summary>
        /// Logins the specified login container.
        /// </summary>
        /// <param name="loginContainer">The login container.</param>
        void Login(LoginContainer loginContainer);

        /// <summary>
        /// Logouts this instance.
        /// </summary>
        void Logout();
    }
}